﻿using UnityEngine;
using System.Collections;

public class SpeedCheckGreater : SpeedCheck
{
    public float GreaterThreshold;
    protected override void Awake()
    {
        base.Awake();
        TextMesh txt = GetComponentInChildren<TextMesh>();
        switch (m_Axis)
        {
            case Axis.X:
                txt.text += "方向：" + (m_Direction > 0 ? "右" : "左");
                break;
            case Axis.Y:
                txt.text += "方向：" + (m_Direction > 0 ? "上" : "下");
                break;
        }
        txt.text += "速度要大于" + GreaterThreshold + "m/s";
    }
    protected override bool CheckSpeed()
    {
        return exitSpeed > GreaterThreshold;
    }
}
